<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- 定义jsp页面demo2，判断一个数是正数还是负数，正数用蓝色显示，负数用红色显示。 -->
	<% int num = -1;
	  String result;
	%>
	<%
	if(num > 0){
		result = "正数";
	%>
	<font color="blue"><%=result %></font>
	<%}else{
		result = "负数";
	%>
		<font color="red"><%=result %></font>
	<%} %>
</body>
</html>